﻿namespace PLCS.Application.Contracts.ProcessApp.Dtos
{
    public class ProcessDto : EntityDto<Guid>
    {
        /// <summary>
        /// 工序编号
        /// </summary>
        public string ProcessNo { get; set; }

        /// <summary>
        /// 工序名称
        /// </summary>
        public string ProcessName { get; set; }

        /// <summary>
        /// 目标位
        /// </summary>
        public string TargetPos { get; set; }

        /// <summary>
        /// 承接工序名称(可为空，为空即为按步骤往下走，有值的话，做完当前工序要去寻找承接工序的那一步，从那开始执行)
        /// </summary>
        public string? ContinueProcess { get; set; }

        /// <summary>
        /// 是否有触发条件
        /// </summary>
        public bool IsTrigger { get; set; }

        /// <summary>
        /// 是否下线
        /// </summary>
        public YesNo IsEnd { get; set; }

        /// <summary>
        /// 任务前执行方法
        /// </summary>
        public string? BeforeExecutionMethod { get; set; }

        /// <summary>
        /// 任务前执行参数
        /// </summary>
        public string? BeforeExecutionParam { get; set; }

        /// <summary>
        /// 任务完成执行方法
        /// </summary>
        public string? AfterExecutionMethod { get; set; }

        /// <summary>
        /// 任务完成执行参数
        /// </summary>
        public string? AfterExecutionParam { get; set; }

        /// <summary>
        /// 触发条件
        /// </summary>
        public List<TriggerDto>? Triggers { get; set; }
    }
}